﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using System.Text;
using System.IO;

namespace MusicCatalogue
{
    class Program
    {
        static void Main(string[] args)
        {
            string inputFile = "Catalogue.xml";
            MusicCatalogueUtils utils = new MusicCatalogueUtils(inputFile);
            //utils.ExtractArtistsAndNumberOfSongs();
            //utils.DeleteCheapAlbums();
            //List<string> songTitles = utils.GetSongTitles();
            //foreach (string songTitle in songTitles) 
            //{
            //    Console.WriteLine(songTitle);
            //}
            //XDocument catalogue = XDocument.Load("catalogue.xml");
            //var songNames =
            //    from book in catalogue.Descendants("song")
            //    select book.Element("title").Value;
            //foreach (var book in songNames) 
            //{
            //    Console.WriteLine(book.Trim());
            //}
            HardDriveTraverser traverser = new HardDriveTraverser();
            string path = @"D:\az\Telerik";
            DirectoryInfo directory = new DirectoryInfo(path);
            traverser.GenerateXml(directory);
        }
    }
}
